//处理删除（可执行）
const db=require("../lib/db")

function deleteArticle(id){
    return new Promise((resolve,reject)=>{
        let sql=`delete from article where id=${id}`
        db.querySql(sql).then(data=>{
            if(data.length==0){
                resolve(404)
            }else{
                console.log(true)
                resolve(true)
            }
        })
    })
}

module.exports=deleteArticle;